HOWTO install "GO" and compile a "Hello World" program on Ubuntu Linux

"Here we GO !"


ubuntuprompt$ sudo apt-get install bison gcc libc6-dev ed


-------------------------------------------------------------------------------------------------------------------------------------
Edit .bashrc (I used vi and added four lines)

ubuntuprompt$ vi $HOME/.bashrc


export GOBIN=$HOME/go/bin
export PATH=$PATH:$GOBIN
export GOOS='linux' # Refers to the TARGET environment !
export GOARCH='386' # Refers to the TARGET environment !

-------------------------------------------------------------------------------------------------------------------------------------
(start a fresh Terminal session before proceeding)
ubuntuprompt$ env | grep '^GO'
GOBIN=/home/mike/go/bin
GOARCH=386
GOROOT=/home/mike/go
GOOS=linux

-------------------------------------------------------------------------------------------------------------------------------------
ubuntuprompt$ sudo apt-get install mercurial
ubuntuprompt$ hg clone -r release https://go.googlecode.com/hg/ $GOROOT
ubuntuprompt$ mkdir $HOME/go/bin
ubuntuprompt$ cd $GOROOT/src ; ls
ubuntuprompt$ ./all.bash  (takes a while to complete.. so go and get a coffee about now)

if all goes well you will see...

"0 known bugs; 0 unexpected bugs" in your terminal session...

-------------------------------------------------------------------------------------------------------------------------------------


Now to test drive GO..

ubuntuprompt$ cat >hello.go <<EOF
package main

import "fmt"

func main() {
    fmt.Printf("Hello World\n")
}
EOF

-------------------------------------------------------------------------------------------------------------------------------------
ubuntuprompt$ 8g hello.go

-------------------------------------------------------------------------------------------------------------------------------------
ubuntuprompt$ 8l hello.8

-------------------------------------------------------------------------------------------------------------------------------------
ubuntuprompt$ ./8.out
Hello World !

-------------------------------------------------------------------------------------------------------------------------------------

                                                              Congratulations !

-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------

CHAT-SNIFFER: "Older Devs"

OldDogOne: ahhhhhhhh, we struggle to organise interesting meetups for the (ki)devs and then "on the day" ...no one really cares...they simply rush towards the free food and ignore the chance to "develop themselves" in any way

OldDogTwo: I totally understand, we had a similar discussion at our "Town Hall Planning Meeting", i.e. setting up the schedule for the next 6 month. The main Topic was "How can we attract more designers?"

There was a strong thread of, "wait a minute, who gives a fuck?!"

 

OldDogOne: yep...we also suffer from the “techie me-me pack-mentality” where 90% dont care enough to speak up or come back to a question later even if it does bother them

OldDogTwo: difficult to balance “crowd pleaser presentations”, which are largely boring to those of us who care, with talks that are “novel but hard”, which are generally more interesting.

 

OldDogOne: we also get criticised for focusing on "a novel approach to the problem" in a generalist way...the hardcore attendees hate this..they want to see "perfect example stanzas of <insert fav language here> painted into a minimalist golden frame"

OldDogTwo: yeah, devs are often conservative

 

OldDogOne: conservative? I'd say ..too lazy to really "take-in" or "solve" problems...they sew the seeds of their own destruction...it's all about THEMSELVES not the PROBLEM space, it's “the code they like”...some sort of mutual appreciation of art...instead of a pragmatic "make it work -out there"

OldDogTwo: they are simply wedded to the surface form of the language rather than the real idea

 

OldDogOne: yes, and hard to get any of these script kiddies to "budge" from that position

OldDogTwo: Well, that's the local minima that is 'coding', unfortunate it's lasted 40 years ;-)

 

OldDogOne: nail on the head, add to that the "code golfers" who like to see minimum-keystrokes as some sort of macho sport ..much like the gym meat-head tough-guys out-lifting each other, week after week...totally lost in their own purism

OldDogTwo: Yeah...who gives a fuck ! :-)